import {Component, Input, Output, OnInit, EventEmitter, TemplateRef, ViewChild, ChangeDetectionStrategy} from '@angular/core';

@Component({
  selector: 'app-wyy-carousel',
  templateUrl: './wyy-carousel.component.html',
  styleUrls: ['./wyy-carousel.component.less'],
  changeDetection: ChangeDetectionStrategy.OnPush
})

export class WyyCarouselComponent implements OnInit {
  @Input() currentIndex = 0;
  @Output() changeCarousel = new EventEmitter<'pre'|'next'>();
  @ViewChild('dot', { static: true }) dotRef: TemplateRef<any>;
  constructor() { }

  ngOnInit() {
  }
  toggleCarousel(type: 'pre'|'next') {
    this.changeCarousel.emit(type);
  }
}
